package cn.kxm.controller;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;

import cn.kxm.pojo.InquiryBill;
import cn.kxm.service.InquiryBillService;

@Controller
@RequestMapping("/InquiryBill")
public class InquiryBillController extends BaseController{

	@Autowired
	private InquiryBillService iBillService;
	
	@RequestMapping("getInquiryBill_Detal")
	@ResponseBody
	public Object getInquiryBill_Detal(Integer page,Integer rows,InquiryBill iBill,Date endTime){
		Map<String, Object>map=new HashMap<String, Object>();
		List<Map<String,Object>>list=iBillService.getInquirybill(iBill, endTime, page, rows);
		map.put("rows", list);
		map.put("total", iBillService.getInquirybillCount(iBill, endTime));
		return JSON.toJSON(map);
	}
	
}
